<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<script type="text/javascript">
var deptId = "${query.fields[0].value}"||"root";
</script>
<script src="scripts/apps/product/list.js" type="text/javascript"></script>
<div id="depts" class="btn-group"></div>

<table class="table table-bordered table-hover">
<thead>
<tr>
<th>代码</th>
<th>名称</th>
<th>价格</th>
<th>单位</th>
<th>管理</th>
</tr>
<tr>
<td colspan="5">
<button class="btn btn-success" onclick="newOne();">
<i class="icon-plus"></i>新增产品
</button>
</td>
</tr>
</thead>
<tbody>
   <c:forEach items="${pager.rows}" var="item">
     <tr>
       <td>
       <button class="btn btn-small btn-primary" onclick="showProduct('${item.code}');">${item.code}</button>
       </td>
       <td>${item.name}</td>
       <td>${item.price}</td>
       <td>${item.priceUnit}</td>
       <td>
       <button class="btn btn-danger btn-mini" onclick="removeOne('${item.code}')">
       	<i class="icon-remove"></i>
       </button>
     </tr>
   </c:forEach>
</tbody>
<tfoot>
  <tr>
    <td colspan="4">
      ${pager.pagination}
    </td>
  </tr>
</tfoot>
</table>

